package com.buer.storage.dao;

import com.buer.storage.dto.CategorySelectDto;
import com.buer.storage.dto.ProdCategoryDto;
import com.buer.storage.entity.CategoryTwo;
import com.buer.storage.entity.Prod;
import com.buer.storage.entity.ProdCategory;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface ProdCategoryDao {

    //增加装备分类
    int add(ProdCategoryDto prodCategoryDto);

    //删除装备分类
    int delete(int categoryId);

    //修改装备分类
    int update(ProdCategory prodCategory);

    //查询所有装备分类
    List<ProdCategory> select();

    //通过编号或者名字查询
    List<ProdCategory> selectByName(String categoryNumber, String categoryName);
    //yiji
    List<CategorySelectDto> selectTwo();
    //erji
    CategoryTwo[] selectAll(Integer categoryId);

    List<Prod> selectCategory(Integer categoryTwoId,String prodName);

    List<String> getChildName(Integer categoryId);
}
